<?php


namespace App\Models;


use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\TeamGoals
 *
 * @property int $id
 * @property int $user_id 用户 ID
 * @property int $amount 资料量
 * @property int $effect_mobile 有效电话量
 * @property int $intention 意向客户量
 * @property int $visit 拜访量
 * @property int $order 成单量
 * @property int $wechat 微信量
 * @property Carbon $month 目标月份
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals query()
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereEffectMobile($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereEndAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereIntention($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereOrder($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereStartAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereVisit($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TeamGoals whereWechat($value)
 * @mixin \Eloquent
 * @property-read \App\Models\User $user
 */
class TeamGoals extends Model
{

    protected $table = 'team_goals';


    protected $casts = [
        'month' => 'datetime',
    ];

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}
